package com.tanhua.model.vo;

import com.tanhua.model.db.Questions;
import com.tanhua.model.db.SoulPaper;
import com.tanhua.model.db.UserInfo;
import com.tanhua.model.mongo.Voice;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.List;
//返回给前端的试卷对象
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SoulPaperVo implements Serializable {


    private String id;      //主键id
    private String name;    //试卷名字
    private String cover;   //封面
    private String level;   //级别
    private Integer star;   //星级
    private List<QuestionsVo> questions; //试题
    private Integer isLock=1;     //默认加锁, 0解锁，1加锁
    private String  reportId;     //答题完成后生成的报告id

    public static SoulPaperVo init(SoulPaper soulPaper) {
        SoulPaperVo vo = new SoulPaperVo();
        //copy用户属性
        BeanUtils.copyProperties(soulPaper,vo);
        //返回
        return vo;
    }
}